﻿//-----------------------------------------------------------------------------
// <copyright file="FakeTestMessage.cs" company="William E. Kempf">
//     Copyright (c) William E. Kempf.
// </copyright>
//-----------------------------------------------------------------------------

namespace SimpleTest.TestArtifacts
{
    using System;
    using Simple;
    using Testing.Specificity;

    /// <summary>
    /// Provides a "test fake" for the <see cref="ITestMessage"/> interface.
    /// </summary>
    internal class FakeTestMessage : ITestMessage
    {
        /// <summary>
        /// Gets or sets the delegate called by the getter for the <see cref="ITestMessage.TestMessage"/> property.
        /// </summary>
        /// <value>The delegate to call by the getter for the <see cref="ITestMessage.TestMessage"/> property.</value>
        public Func<string> GetTestMessage { get; set; }

        /// <summary>
        /// Gets the test message.
        /// </summary>
        /// <value>The test message.</value>
        string ITestMessage.TestMessage
        {
            get
            {
                return this.GetTestMessage();
            }
        }
    }
}
